import { ALLOCATION } from "@/mdesign-lib/mdesign-app.umd.js";

export default {
  newWindowOpen: {
    label: "新窗口打开",
    value: "newWindowOpen",
    icon: "statics/icons/app/iconNewwindow.png",
    disabled: true,
    index: 3,
    group: 1
  },
  openDiagram: {
    label: "打开图表",
    value: "openDiagram",
    icon: "",
    index: 2,
    group: 1
  },
  manageNumber: {
    label: "序号管理",
    value: "manageNumber",
    // "icon": "statics/icons/app/iconnumber.svg",
    index: 3,
    group: 2,
    disabledWhenReadonly: true
  },
  showAttribute: {
    label: "属性设置",
    value: "showAttribute",
    // "icon": "statics/icons/app/iconproperty2.svg",
    index: 2,
    group: 2
  },
  modelValidate: {
    label: "模型校验",
    value: "modelValidate",
    disabledWhenReadonly: true,
    index: 1,
    group: 2,
    children: [
      {
        label: "校验模型",
        value: "validateConfig"
      },
      {
        label: "校验当前模型",
        value: "ValidateCurrentModel"
      },
      {
        label: "递归校验模型",
        value: "ValidateModelAll"
      }
    ]
  },
  modelValidateDiagram: {
    label: "模型校验",
    value: "modelValidateDiagram",
    disabledWhenReadonly: true,
    index: 1,
    group: 2,
    children: [
      {
        label: "校验图表",
        value: "ValidateDiagram"
      }
    ]
  },
  replaceElement: {
    label: "替换元素",
    value: "replaceElement",
    // "icon": "statics/icons/app/iconproperty2.svg",
    index: 2,
    group: 2
  },
  removeShape: {
    label: "移出",
    value: "removeShape",
    // "icon": "statics/icons/table/removeFromTable.svg",
    index: 3,
    group: 3,
    disabledWhenReadonly: false,
    disabledWhenGraphReadonly: true,
    children: []
  },
  deleteShape: {
    label: "删除",
    value: "deleteShape",
    // "icon": "statics/icons/app/toolbardelete.svg",
    index: 3,
    group: 3,
    disabledWhenReadonly: true,
    disabledWhenGraphReadonly: true,
    children: []
  },
  deleteAllSwimlaneShape: {
    label: "删除全部泳道",
    value: "deleteAllSwimlaneShape",
    // "icon": "statics/icons/app/toolbardelete.svg",
    index: 3,
    group: 3,
    disabledWhenReadonly: true,
    disabledWhenGraphReadonly: true,
    children: []
  },
  showStereotype: {
    label: "构造型",
    value: "showStereotype",
    // "icon": "statics/images/sysml/PropertySpecificType.svg",
    index: 1,
    group: 5,
    disabledWhenReadonly: true
  },
  showBatchStereotype: {
    label: "构造型",
    value: "showBatchStereotype",
    // "icon": "statics/images/sysml/PropertySpecificType.svg",
    index: 1,
    group: 5,
    disabledWhenReadonly: true
  },
  refactor: {
    label: "重构",
    value: "refactor",
    disabledWhenReadonly: true,
    index: 1,
    group: 5,
    children: [
      {
        label: "泛化重定义",
        value: "redefine"
      },
      {
        label: "替换为",
        value: "replaceTip"
      }
    ]
  },
  distributionMode: {
    label: "分配模式",
    value: "distributionMode",
    disabledWhenReadonly: true,
    index: 1,
    group: 5,
    children: [
      {
        label: "定义模式",
        value: "definition"
      },
      {
        label: "使用模式",
        value: "usage"
      }
    ]
  },
  flowRefactor: {
    label: "重构",
    value: "refactor",
    disabledWhenReadonly: true,
    index: 1,
    group: 6,
    children: [
      {
        label: "结合连接器",
        value: "joinFlow"
      }
    ]
  },
  controlFlowRefactor: {
    label: "重构",
    value: "refactor",
    disabledWhenReadonly: true,
    index: 1,
    group: 6,
    children: [
      {
        label: "分割控制流",
        value: "splitFlow"
      },
      {
        label: "结合连接器",
        value: "joinFlow"
      },
      {
        label: "变更方向",
        value: "changeDirection"
      }
    ]
  },
  objectFlowRefactor: {
    label: "重构",
    value: "refactor",
    disabledWhenReadonly: true,
    index: 1,
    group: 6,
    children: [
      {
        label: "分割对象流",
        value: "splitFlow"
      },
      {
        label: "结合连接器",
        value: "joinFlow"
      }
    ]
  },
  displayRelated: {
    label: "显示",
    value: "displayRelated",
    // "icon": "statics/icons/app/iconshow.png",
    index: 2,
    group: 5,
    disabledWhenReadonly: false,
    disabledWhenGraphReadonly: true,

    children: [
      {
        label: "隐藏所有端口",
        value: "hidePorts"
      },
      {
        label: "显示端口/部件",
        value: "showPartsAndPorts"
      },
      {
        label: "显示关系连线",
        value: "showRelationEdge"
      },
      {
        label: "显示内部元素",
        value: "showInnerItem"
      },
      {
        label: "显示关联元素",
        value: "showRelatedElement"
      },
      {
        label: "显示内部端口",
        value: "showInternalPort",
        disabled: false
      },
      {
        label: "活动参数节点",
        value: "showActivityParameterNode"
      }
    ]
  },
  tool: {
    label: "工具",
    value: "tool",
    disabledWhenReadonly: true,
    // "icon": "statics/icons/app/toolbartoolcase.svg",
    index: 3,
    group: 5,
    children: [
      {
        label: "从行为模型创建内部模块图",
        value: "createIbdOnBehavior"
      },
      {
        label: "保存默认值",
        value: "saveDefaultValue"
      }
    ]
  },
  packageTool: {
    label: "工具",
    value: "tool",
    disabledWhenReadonly: true,
    index: 3,
    group: 5,
    children: [
      {
        label: "参数归一化",
        value: "normalizeParameter"
      }
    ]
  },
  removeModel: {
    label: "删除",
    value: "removeModel",
    // "icon": "statics/icons/app/toolbardelete.svg",
    index: 4,
    group: 3,
    disabledWhenReadonly: true
  },
  selectOnTree: {
    label: "树上高亮",
    value: "selectOnTree",
    // "icon": "statics/icons/table/showModelPosition.svg",
    index: 3,
    group: 2
  },
  createIBD: {
    label: "创建IBD",
    value: "createIBD",
    icon: "",
    index: 2,
    group: 6,
    disabledWhenReadonly: true
  },
  cooperation: {
    label: "协同",
    value: "cooperation",
    disabled: false,
    icon: "",
    index: 1,
    group: 1,
    children: [
      {
        label: "锁定编辑",
        value: "checkIn",
        alterTranslate: "Lock for Edit",
        disabled: false,
        children: [
          {
            label: "递归锁定",
            value: "checkInPackageAll",
            disabled: false
          },
          {
            label: "仅锁定当前包",
            value: "checkInPackage",
            disabled: false
          }
        ]
      },
      {
        label: "解锁",
        value: "checkOut",
        disabled: false
      },
      {
        label: "锁定编辑信息",
        value: "checkInMsg"
      }
    ]
  },
  openCreateDiagram: {
    label: "新建图表",
    value: "openCreateDiagram",
    icon: "",
    index: 5,
    group: 1,
    disabledWhenReadonly: true
  },
  openCreateElement: {
    label: "新建元素",
    value: "openCreateElement",
    icon: "",
    index: 4,
    group: 1,
    disabledWhenReadonly: true
  },
  analysis: {
    label: "影响分析",
    value: "analysis",
    icon: "",
    index: 0,
    group: 1,
    disabledWhenReadonly: true,
    children: [
      {
        label: "可能影响",
        value: "analysis",
        icon: "statics/icons/app/icon_MayEffect.svg",
        type: "MayEffect"
      },
      {
        label: "确定影响",
        value: "analysis",
        icon: "statics/icons/app/icon_ConfirmEffect.svg",
        type: "ConfirmEffect"
      },
      {
        label: "不受影响",
        value: "analysis",
        icon: "statics/icons/app/icon_notEffect.svg",
        type: "NotEffect"
      }
    ]
  },
  openCreateRelation: {
    label: "新建关系",
    value: "openCreateRelation",
    icon: "",
    index: 6,
    group: 1,
    disabledWhenReadonly: true,

    children: [
      {
        label: "出方向",
        value: "openCreateRelation",
        type: "Outgoing"
      },
      {
        label: "入方向",
        value: "openCreateRelation",
        type: "Incoming"
      }
    ]
  },
  setNodeInEdit: {
    label: "重命名",
    value: "setNodeInEdit",
    // "icon": "statics/icons/app/iconrename.png",
    index: 1,
    group: 2,
    disabledWhenReadonly: true
  },
  copyNode: {
    label: "复制",
    value: "copyNode",
    // "icon": "statics/images/mainpage/iconcopy.svg",
    index: 1,
    group: 3
  },
  cutNode: {
    label: "剪切",
    value: "cutNode",
    // "icon": "statics/images/mainpage/iconcopy.svg",
    index: 2,
    group: 3,
    disabledWhenReadonly: true
  },
  pasteNode: {
    label: "粘贴",
    value: "pasteNode",
    // "icon": "statics/images/mainpage/iconpaste.svg",
    index: 3,
    group: 3,
    disabledWhenReadonly: true
  },
  navTo: {
    label: "导航",
    value: "navTo",
    // "icon": "statics/icons/app/iconnavigation.png",
    children: [],
    index: 4,
    group: 5
  },
  util: {
    label: "工具",
    value: "util",
    disabledWhenReadonly: true,
    index: 5,
    group: 5,
    children: [
      // {
      //   "label": "快速应用包结构配置",
      //   "value": "quickApplyPackageStructureConfig"
      // },
      // {
      //   "label": "参数归一化",
      //   "value": "normalizeParameter"
      // },
    ]
  },
  locateComment: {
    label: "定位批注",
    value: "LocateComment",
    // "icon": "statics/icons/app/iconnavigation.png",
    children: [],
    index: 6,
    group: 5
  },
  quickCreateDiagram: {
    label: "快速创建视图",
    value: "quickCreateDiagram",
    index: 3,
    group: 6,
    disabledWhenReadonly: true
  },
  // "createIBDDiagram": {
  //  "label": "快速创建IBD",
  //  "value": "createIBDDiagram",
  //  "index": 3,
  //  "group": 6,
  //  "disabledWhenReadonly": true

  // },
  // "createPARDiagram": {
  //  "label": "快速创建PAR",
  //  "value": "createPARDiagram",
  //  "index": 4,
  //  "group": 6,
  //  "disabledWhenReadonly": true

  // },
  // "QuickCreateActDiagram": {
  //  "label": "快速创建ACT",
  //  "value": "QuickCreateActDiagram",
  //  "index": 4,
  //  "group": 6,
  //  "disabledWhenReadonly": true

  // },
  // "updateScript": {
  //   "label": "提交/更新脚本",
  //   "value": "updateScript",
  //   "icon": ""
  // },
  // "changeDLL": {
  //   "label": "修改dll动态库地址",
  //   "value": "changeDLL",
  //   "icon": ""
  // },
  updateFMUFile: {
    label: "从FMU文件更新",
    value: "updateFMUFile",
    // "icon": "statics/icons/app/iconsimulation.png",
    disabled: false,
    index: 6,
    group: 7
  },
  simulate: {
    label: "仿真",
    value: "simulate",
    // "icon": "statics/icons/app/iconsimulation.png",
    disabled: false,
    index: 5,
    group: 8,
    children: [
      {
        label: "运行",
        value: "openSimulate",
        disabled: false
      },
      {
        label: "以上下文运行",
        value: "openSimulateByContext",
        disabled: true
      },
      {
        label: "设置断点",
        value: "setBreakPoint",
        disabled: true
      },
      {
        label: "取消断点",
        value: "removeBreakPoint",
        disabled: true
      }
    ]
  },
  export: {
    label: "导出",
    // "icon": "statics/icons/app/iconexport.svg",
    value: "export",
    index: 2,
    group: 4,
    children: [
      {
        label: "导出项目*.md3",
        value: "exportMd3"
        // "icon": "statics/icons/app/iconnavigation.png"
      },
      {
        label: "导出元模型*.md3p",
        value: "exportProfile"
        // "icon": "statics/icons/app/iconnavigation.png"
      },
      {
        label: "导出图片",
        value: "exportImageBatch"
      },
      {
        label: "下发项目",
        value: "distributeProject",
        disabledWhenReadonly: true
      }
    ]
  },
  import: {
    label: "导入",
    value: "import",
    // "icon": "statics/icons/app/iconleadin.svg",
    index: 1,
    group: 4,
    disabledWhenReadonly: true,

    children: [
      {
        label: "导入项目",
        value: "importProject",
        children: [
          {
            label: "*.md3",
            value: "importProjectMd3"
          }
        ]
      },
      {
        label: "导入需求表",
        value: "importRequirement",
        children: [
          {
            label: "Excel",
            value: "importExcel"
          },
          {
            label: "ReqIF",
            value: "importReqif"
          }
        ]
      }
    ]
  },
  syncReq: {
    label: "同步需求",
    value: "syncReq",
    // "icon": "statics/icons/app/topiconxqtb.png",
    disabled: true,
    disabledWhenReadonly: true,

    index: 3,
    group: 4
  },
  projectUse: {
    label: "项目使用",
    value: "projectUse",
    // "icon": "statics/icons/app/iconleadin.svg",
    index: 4,
    group: 4,
    disabledWhenReadonly: true,
    children: [
      {
        label: "共享模型包",
        value: "ModelShare"
      }
    ]
  },
  openFile: {
    label: "打开",
    value: "openFile",
    icon: ""
  },
  saveAsFile: {
    label: "另存到本地",
    value: "saveAsFile",
    icon: ""
  },
  insertSwimlane: {
    label: "插入泳道",
    value: "insertSwimlaneGroup",
    icon: "",
    disabled: false,
    disabledWhenReadonly: true,
    disabledWhenGraphReadonly: true,
    children: [
      {
        label: "左侧插入垂直泳道",
        value: "insertSwimlane",
        to: "leftVertical",
        disabledWhenReadonly: true,
        disabledWhenGraphReadonly: true
      },
      {
        label: "右侧插入垂直泳道",
        value: "insertSwimlane",
        to: "rightVertical",
        disabledWhenReadonly: true,
        disabledWhenGraphReadonly: true
      },
      {
        label: "上方插入水平泳道",
        value: "insertSwimlane",
        to: "topHorizontal",
        disabledWhenReadonly: true,
        disabledWhenGraphReadonly: true
      },

      {
        label: "下方插入水平泳道",
        value: "insertSwimlane",
        to: "bottomHorizontal",
        disabledWhenReadonly: true,
        disabledWhenGraphReadonly: true
      }
    ]
  },
  insertInnerSwimlane: {
    label: "插入内部泳道",
    value: "insertInnerSwimlaneGroup",
    icon: "",
    disabled: false,
    disabledWhenReadonly: true,
    disabledWhenGraphReadonly: true,
    children: [
      {
        label: "垂直泳道",
        value: "insertInnerSwimlane",
        direction: "vertical",
        disabledWhenReadonly: true,
        disabledWhenGraphReadonly: true
      },
      {
        label: "水平泳道",
        value: "insertInnerSwimlane",
        direction: "horizontal",
        disabledWhenReadonly: true,
        disabledWhenGraphReadonly: true
      }
    ]
  },
  deleteSwimlane: {
    label: "删除泳道",
    value: "deleteSwimlaneGroup",
    icon: "",
    disabled: true,
    disabledWhenReadonly: true,
    disabledWhenGraphReadonly: true,
    children: [
      {
        label: "垂直泳道",
        value: "deleteSwimlane",
        direction: "vertical",
        disabledWhenReadonly: true,
        disabledWhenGraphReadonly: true
      },
      {
        label: "水平泳道",
        value: "deleteSwimlane",
        direction: "horizontal",
        disabledWhenReadonly: true,
        disabledWhenGraphReadonly: true
      }
    ]
  },
  changeGeneralizationSet: {
    label: "泛化集",
    value: "changeGeneralizationSet",
    icon: "",
    disabled: true,
    group: 2,
    index: 3
  },
  updateProfile: {
    label: "更新扩展",
    value: "updateProfile",
    disabled: true,
    group: 5,
    index: 3
  },
  editProfile: {
    label: "编辑",
    value: "editProfile",
    group: 5,
    index: 4
  },
  editImportMap: {
    label: "编辑",
    value: "editImportMap",
    disabledWhenReadonly: true,
    group: 5,
    index: 4
  },
  useImportMap: {
    label: "Import",
    value: "useImportMap",
    disabledWhenReadonly: true,
    group: 5,
    index: 4
  },
  // "automaticsize": {
  //   "label": "自动大小",
  //   "value": "automaticsize",
  //   // "icon": "statics/icons/graph/toolbarAutomaticsize.svg",
  //   "disabledWhenReadonly": true,

  //   "index": 7,
  //   "group": 5
  // }
  createConstraint: {
    label: "新建构造型约束",
    value: "createConstraint",
    icon: "",
    index: 5,
    group: 1,
    disabledWhenReadonly: true
  },

  editCompartment: {
    label: "编辑隔间",
    value: "editCompartment",
    index: 3,
    group: 3,
    disabledWhenReadonly: true,
    disabledWhenGraphReadonly: true
  },
  refreshNoteCompartment: {
    label: "刷新",
    value: "refreshNoteCompartment",
    index: 3,
    group: 3,
    disabledWhenReadonly: true,
    disabledWhenGraphReadonly: true
  },
  refreshContentShape: {
    label: "刷新",
    value: "refreshContentShape",
    index: 3,
    group: 3,
    disabledWhenReadonly: true,
    disabledWhenGraphReadonly: true
  },
  securityAndReliability: {
    label: "安全和可靠性分析",
    value: "securityAndReliability",
    icon: "",
    disabled: false,
    disabledWhenReadonly: true,
    disabledWhenGraphReadonly: true,
    children: [
      {
        label: "可靠性分配",
        value: "reliabilityDistribute",
        direction: "vertical",
        disabledWhenReadonly: true,
        disabledWhenGraphReadonly: true,
        children: [
          {
            label: "等分配法",
            value: ALLOCATION.ALLOCATION_METHOD_DFPF,
            direction: "vertical",
            disabledWhenReadonly: true,
            disabledWhenGraphReadonly: true
          },
          {
            label: "评分分配法",
            value: ALLOCATION.ALLOCATION_METHOD_PFFPF,
            direction: "vertical",
            disabledWhenReadonly: true,
            disabledWhenGraphReadonly: true
          },
          {
            label: "比例组合分配",
            value: ALLOCATION.ALLOCATION_METHOD_BLZHF,
            direction: "vertical",
            disabledWhenReadonly: true,
            disabledWhenGraphReadonly: true
          },
          {
            label: "分配记录",
            value: "divideRecord",
            direction: "vertical",
            disabledWhenReadonly: true,
            disabledWhenGraphReadonly: true
          }
        ]
      },
      {
        label: "可靠性预计",
        value: "reliabilityEstimate",
        direction: "vertical",
        disabledWhenReadonly: true,
        disabledWhenGraphReadonly: true,
        children: [
          {
            label: "元器件计数法",
            value: ALLOCATION.ESTIMATION_METHOD_YQJJSF,
            direction: "vertical",
            disabledWhenReadonly: true,
            disabledWhenGraphReadonly: true
          },
          {
            label: "应力分析法",
            value: ALLOCATION.ESTIMATION_METHOD_YLFXF,
            direction: "vertical",
            disabledWhenReadonly: true,
            disabledWhenGraphReadonly: true
          },
          {
            label: "故障率预计法",
            value: ALLOCATION.ESTIMATION_METHOD_GZLYJF,
            direction: "vertical",
            disabledWhenReadonly: true,
            disabledWhenGraphReadonly: true
          },
          {
            label: "相似电路法",
            value: ALLOCATION.ESTIMATION_METHOD_XSDLF,
            direction: "vertical",
            disabledWhenReadonly: true,
            disabledWhenGraphReadonly: true
          },
          {
            label: "相似产品法",
            value: ALLOCATION.ESTIMATION_METHOD_XSCPF,
            direction: "vertical",
            disabledWhenReadonly: true,
            disabledWhenGraphReadonly: true
          },
          {
            label: "预计记录",
            value: "EstimateRecord",
            direction: "vertical",
            disabledWhenReadonly: true,
            disabledWhenGraphReadonly: true
          }
        ]
      }
    ]
  },
  encryptModel: {
    label: "模型封装",
    value: "encryptModel",
    index: 3,
    group: 3,
    disabledWhenReadonly: true
  },
  decryptModel: {
    label: "模型解封",
    value: "decryptModel",
    index: 3,
    group: 3
  },
  generationFunction: {
    label: "生成函数",
    value: "generationFunction",
    index: 3,
    group: 3
  },
  generationDocTemplate: {
    label: "生成文档模板",
    value: "generationDocTemplate",
    index: 3,
    group: 3
  },
  copyStyle: {
    label: "复制样式",
    value: "copyStyle",
    // "icon": "statics/images/mainpage/iconcopy.svg",
    index: 3,
    group: 1
  },
  pasteStyle: {
    label: "粘贴样式",
    value: "pasteStyle",
    // "icon": "statics/images/mainpage/iconpaste.svg",
    index: 2,
    group: 1
  }
};
